add #break statement to arc files for gaps in the arc
authorparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 26 Oct 2004 15:28:52 +0000 (15:28 +0000)
committerparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 26 Oct 2004 15:28:52 +0000 (15:28 +0000)
gpsbabel/README
gpsbabel/arcdist.c

index bd6cf7ac58a8176003032e708593b31478c67350..dd1dead2797b24fc816b8bc6fd792a67be16857d 100644 (file)
@@ -745,6 +745,11 @@ DATA FILTERS
          41.144270897    -85.163655281
          41.141953468    -85.162882805
 
+        An arc file may optionally contain gaps in the arc.  You can 
+        specify such a gap by inserting a line containing "#break" 
+        either on a line by itself or after the coordinates of the
+        starting point of the new arc segment.
+
         In addition to the file containing the arc, you should also
         specify the maximum distance from the arc that will be accepted;
         that distance is declared on the command line with the
index 3fc13459a29d9c61816cd528c3e1c48c9e80875d..800c45dd424487b5af04b55d7757d53e407d7c97 100644 (file)
@@ -74,7 +74,12 @@ arcdist_process(void)
            fileline++;
            
            pound = strchr( line, '#' );
-           if ( pound ) *pound = '\0';
+           if ( pound ) {
+               if ( 0 == strncmp( pound, "#break", 6)) {
+                   lat1 = lon1 = BADVAL;
+               }
+               *pound = '\0';
+           }
            
            lat2 = lon2 = BADVAL;
            argsfound = sscanf( line, "%lf %lf", &lat2, &lon2 );